package com.xiaodu.acer.phoneplay.ui.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xiaodu.acer.phoneplay.R;
import com.xiaodu.acer.phoneplay.bean.CategoryBean;
import com.xiaodu.acer.phoneplay.common.Constant;

import library.imageloader.ImageLoader;


public class CategoryAdapter extends BaseQuickAdapter<CategoryBean,BaseViewHolder> {

    public CategoryAdapter() {
        super(R.layout.template_category);

    }

    @Override
    protected void convert(BaseViewHolder helper, CategoryBean item) {

        helper.setText(R.id.text_name,item.getName());

        ImageLoader.load(Constant.BASE_IMG_URL+item.getIcon(), (ImageView) helper.getView(R.id.img_icon));
    }





}
